<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>3D导航栏案列</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    ul {
      margin: 100px;
    }

    ul li {
      float: left;
      width: 120px;
      height: 35px;
      /* 一会我们要给box旋转 也需要透视 让子盒子的盒子也有透视效果 */
      perspective: 500px;

      text-align: center;

      color: #fff;
    }

    .box {
      width: 100%;
      height: 100%;
      transform-style: preserve-3d;

      transition: all .4s;
    }

    .box:hover {
      transform: rotateX(90deg)
    }

    .front,
    .bottom {
      position: absolute;
      left: 0;
      top: 0;
      width: 100px;
      height: 35px;
    }

    .front {
      background-color: rgba(212, 27, 58, 0.849);
      z-index: 1;
      /* 让盒子往前走17.5像素 */
      transform: translateZ(17.5px);
    }

    .bottom {
      background-color: purple;
      /* 移动自身盒子的百分之50 */
      transform: translateY(17.5px) rotateX(-90deg);
    }
  </style>
</head>

<body>

  <ul>
    <li>
      <div class="box">
        <div class="front">点赞</div>
        <div class="bottom">哈哈哈哈</div>
      </div>
    </li>
    <li>
      <div class="box">
        <div class="front">转发</div>
        <div class="bottom">真转呀</div>
      </div>
    </li>
    <li>
      <div class="box">
        <div class="front">三连</div>
        <div class="bottom">....</div>
      </div>
    </li>
    <li>
      <div class="box">
        <div class="front">帮助</div>
        <div class="bottom">凑数专栏</div>
      </div>
    </li>
  </ul>


</body>

</html>